﻿using AutoMapper;

namespace HobSoft.SoccerBet2014.Client.ModelsMapper
{
    using dm = Domain.Models;
    public class OddsPriceConverter : ITypeConverter<dm.OddsPrice, decimal>
    {
        public decimal Convert(ResolutionContext context)
        {
            var price = context.SourceValue as dm.OddsPrice;
            if (price == null) return 0.0m;
            return price.Price;
        }
    }
}
